import Vue from 'vue'
import Router from 'vue-router'
import index from './views/index.vue'
Vue.use(Router)

export default new Router({
  routes: [
  //进入页
  	{
      path: '/',
      name: 'index',
      component: index
    },
    //登录
    {
      path: '/login',
      name: 'login',
      components:{
      	login:()=>import('./views/login.vue')
      },
      meta:{
      	title:"瑶池后台系统登录"
      }
    },
    //首页组件
	    {//轮播图
	    	path:'/index/swiper',
	    	name:'index/swiper',
	    	component:()=>import('./views/index/swiper.vue'),
	    	meta:{
	    		title:"首页"
	    	}
	    },
	    {//广告
	    	path:'/index/adver',
	    	name:'index/adver',
	    	component:()=>import('./views/index/adver.vue'),
	    	meta:{
	    		title:"首页"
	    	}
	    },
	    {//攻略
	    	path:'/index/startegy',
	    	name:'index/startegy',
	    	component:()=>import('./views/index/startegy.vue'),
	    	meta:{
	    		title:"首页"
	    	}
	    },
	    {//地图
	    	path:'/index/map',
	    	name:'index/map',
	    	component:()=>import('./views/index/map.vue'),
	    	meta:{
	    		title:"首页"
	    	}
	    },
    //预约页
	    {//美食
	    	path:'/appointment/food',
	    	name:'appointment/food',
	    	component:()=>import('./views/appointment/food.vue'),
	    	meta:{
	    		title:"预约页"
	    	}
	    },
	    {//酒店
	    	path:'/appointment/hotel',
	    	name:'appointment/hotel',
	    	component:()=>import('./views/appointment/hotel.vue'),
	    	
	    	meta:{
	    		title:"预约页"
	    	}
	    },
	    {//景点
	    	path:'/appointment/scenic',
	    	name:'appointment/scenic',
	    	component:()=>import('./views/appointment/scenic.vue'),
	    	
	    	meta:{
	    		title:"预约页"
	    	}
	    },
    //文章
	    {//列表
	    	path:'/article/list',
	    	name:'article/list',
	    	component:()=>import('./views/article/list.vue'),
	    	meta:{
	    		title:"文章页"
	    	}
	    },
	    {//新增文章
	    	path:"/article/add",
	    	name:"article/add",
	    	component:()=>import('./views/article/addArticle.vue'),
	    	meta:{
	    		title:"文章页"
	    	}
	    },
	    	{//编辑文章
	    	path:"/article/Edit",
	    	name:"article/Edit",
	    	component:()=>import('./views/article/articleEdit.vue'),
	    	meta:{
	    		title:"文章页"
	    	}
	    },
	    {//轮播图
	    	path:'/article/swiper',
	    	name:'article/swiper',
	    	component:()=>import('./views/article/swiper.vue'),
	    	meta:{
	    		title:"文章页"
	    	}
	    },
    //攻略
	    {
	    	path:'/strategy',
	    	name:'strategy',
	    	component:()=>import('./views/startegy/startegy.vue'),
	    	meta:{
	    		title:"攻略页"
				}
			},
				//添加攻略景点
				{
					path:'/strategy/add',
					name:'strategy/add',
					component:()=>import('./views/startegy/addStartegy.vue'),
					meta:{
						title:"攻略页"
					}
			},
			//编辑攻略景点
			{
				path:'/strategy/edit',
				name:'strategy/edit',
				component:()=>import('./views/startegy/EditStartegy.vue'),
				meta:{
					title:"攻略页"
				}
		},
			
    //动态
	    {
	    	path:'/dynamic',
	    	name:'dynamic',
	    	component:()=>import('./views/dynamic/dynamic.vue'),
	    	meta:{
	    		title:"动态页"
	    	}

	    },
	    //新增动态
	    {
	    	path:'/dynamic/add',
	    	name:'dynamic/add',
	    	component:()=>import('./views/dynamic/addDynamic.vue'),
	    	meta:{
	    		title:"动态页"
	    	}
	    },
	   //招聘
	    {
	    	path:'/recruit',
	    	name:'recruit',
	    	component:()=>import('./views/recruit/recruit.vue'),
	    	meta:{
	    		title:"招聘页"
	    	}
	    },
	    {
	    	path:'/addRecruit',
	    	name:'addRecruit',
	    	component:()=>import('./views/recruit/addRecruit.vue'),
	    	meta:{
	    		title:"新增"
	    	}
	    },
	     {
	    	path:'/Edit',
	    	name:'Edit',
	    	component:()=>import('./views/recruit/Edit.vue'),
	    	meta:{
	    		title:"新增"
	    	}
	    },
	     {
	    	path:'/Dedit',
	    	name:'Dedit',
	    	component:()=>import('./views/dynamic/Dedit.vue'),
	    	meta:{
	    		title:"编辑"
	    	}
	    },
	    {
	    	path:'/dyAdd',
	    	name:'dyAdd',
	    	component:()=>import('./views/dynamic/dyAdd.vue'),
	    	meta:{
	    	title:"新增"
      }
     },
       {//内页
	    	path:'/scenicedit',
	    	name:'scenicedit',
	    	component:()=>import('./views/appointment/Edit/scenicedit.vue'),
	    	meta:{
	    	title:"预约页"
      }
     },
       {//内页
	    	path:'/hoteledit',
	    	name:'hoteledit',
	    	component:()=>import('./views/appointment/Edit/hoteledit.vue'),
	    	meta:{
	    	title:"预约页"
      }
     },
     {//内页
	    	path:'/foodedit',
	    	name:'foodedit',
	    	component:()=>import('./views/appointment/Edit/foodedit.vue'),
	    	meta:{
	    	title:"预约页"
      }
     },
	    {
	    	path:'*',
	    	name:'404',
	    	component:()=>import('./views/404.vue'),
	    	meta:{
	    		title:"404"
	    	}
	    }

  ]
})
